<?

// Display the details tabs

// Show / hide accommodation
$show_accommodation = true;

// Show / hide photos
if($hotel_photos){
	$show_photos = true;
}

// Show / hide map
if($hotel_values['address']){
	$show_map = true;
}

// Show / hide reviews
if($hotel_reviews){
	$show_reviews = true;
	$num_reviews = $hotel_reviews[0]['num_reviews'];
}elseif(!empty($hotel_values['tree_id'])){
	$num_reviews = 0;
	$show_reviews = true;
}


?>

<!-- Start hotel details tab -->


<div class="box_lb_brd_610">
<div class="box_lb_brd_610_shoe">
<div class="box_lb_brd_610_tabs_cap">


<ul class="hotel_tabs" id="simple-tabs">
<? if($show_accommodation){ ?> <li class="hotel_tab_accom_on"><a href="#" class="hotel_tab_active" id="tab-accom">Accommodation</a></li> <? } ?>
<? if($show_map){ ?> <li class="hotel_tab_map_off"><a href="#" id="tab-map">Map</a></li> <? } ?>
<? if($show_photos){ ?> <li class="hotel_tab_photos_off"><a href="#" id="tab-photos">Photos</a></li> <? } ?>
<? if($show_reviews){ ?> <li class="hotel_tab_reviews_off"><a href="#" id="tab-reviews">Customer Reviews (<?= $num_reviews ?>)</a></li> <? } ?>
</ul>



<div class="box_padding_tabs" id="simple-tabs-body">

<h4 title="<?= $hotel_values['name'] ?>"><?= $hotel_values['name'] ?></h4>

<? if($hotel_values['description']){ ?>



<!-- Show photo thumb -->
<div class="desc_photo">
<div class='thumb_cover_div'>
<? if($hotel_photos){ ?>
<a id="main-thumb-ref" href="#"><img src="<?= $lead_hotel_thumb_url ?>" alt="<?= $hotel_values['name'] ?>" class="thumb_image_100" /><img src="/images/thumb_cover_100_74.gif" class="thumb_cover" alt="<?= $destination['name'] ?>" /></a>
<? }?>
</div>
</div>
<!-- End photo thumb -->

<p><?= nl2br($hotel_values['description']) ?></p>

<p>Please note: Some facilities are payable locally.</p>

<p class="acc_desc_note">Whilst LateDeals.ie make every effort to ensure the accuracy of information on our website, accommodation descriptions and photos may contain errors or changes. There may be occasions where facilities are withdrawn or closed due to renovation or off-season. These changes are regrettably beyond our control and therefore we cannot guarantee the accuracy of these descriptions.</p>


<? }else{ ?>
<p>We do not currently have a description available for this property.</p>
<? } ?>
  
</div>
  
  
</div>
</div>
</div>
  
  
<!-- End hotel details tab -->

<div class="clearing"></div>

<br />






<!-- Start empty accom tab -->
<div class="tab_content_containers" id="tab-accom-content"></div>
<!-- End empty accom tab -->







<? if($show_map){ ?>

<!-- Start hotel map tab -->
<div class="tab_content_containers" id="tab-map-content">

<h4 title="Map of <?= $hotel_values['name'] ?>">Map of <?= $hotel_values['name'] ?></h4>

<? if($hotel_values['address']){ ?>
<p><?= nl2br($hotel_values['address']) ?></p>
<? }else{ ?>
<p>Address not available</p>
<? } ?>



</div> 
<!-- End hotel map tab -->

<? } ?>







<? if($show_photos){ ?>

<!-- Start photos tab -->
<div class="tab_content_containers" id="tab-photos-content">

<h4 title="Photos of <?= $hotel_values['name'] ?>">Photos of <?= $hotel_values['name'] ?></h4>

<?

$i=0;
if(!empty($hotel_photos)){
foreach($hotel_photos as $hotel_photo){
?>

<div class="hotel_photo_box"><a class="fancy" rel="group" href="<?= UPLOAD_HTTP_PERM.$hotel_photos[$i]['photo_url_full'] ?>"><img src="<?= UPLOAD_HTTP_PERM.$hotel_photos[$i]['photo_url_thumb'] ?>" alt="<?= $hotel_values['name'] ?>" /></a></div>

<?
$i++;
}
}
?>


<div class="clearing"></div>

<br />

<p class="acc_desc_note">Whilst LateDeals.ie make every effort to ensure the accuracy of information on our website, accommodation descriptions and photos may contain errors or changes. There may be occasions where facilities may be withdrawn. These changes are regrettably beyond our control and therefore we cannot guarantee the accuracy of these descriptions.</p>
  

</div>
<!-- End hotel photos tab -->

<? } ?>







<? 

if($show_reviews){ 

?>

<!-- Start reviews tab -->
<div class="tab_content_containers" id="tab-reviews-content">

<h4 title="Reviews of <?= $hotel_values['name'] ?>">Reviews of <?= $hotel_values['name'] ?></h4>

<p><strong>Have you stayed at this hotel before?</strong> <a href="<?= $lurl_review_add ?>">Write your own review here &rsaquo;</a></p>


<? if($hotel_reviews){ ?>

<div class="box_lb_rev_590">
<div class="box_lb_rev_590_cap">
<div class="box_lb_rev_590_shoe">

<div class="box_padding">

<table>
    <tr>
        <td width="200">
        
<p class="no_margin"><strong>Overall rating </strong> <?= output_rating($hotel_reviews['0']['overall'], "rate", true); ?><br />
( Based on <?= $hotel_reviews['0']['num_reviews']?> reviews )</p>
        
        </td>
        <td width="390">
        
        <table>
            <tr>
                <td width="100">Location</td>
                <td width="80"><?= output_rating($hotel_reviews['0']['location'], "rate", true); ?></td>
                <td width="100">Facilities</td>
                <td width="80"><?= output_rating($hotel_reviews['0']['facilities'], "rate", true); ?></td>
            </tr>
            <tr>
                <td>Value</td>
                <td><?= output_rating($hotel_reviews['0']['value'], "rate", true); ?></td>
                <td>Cleanliness</td>
                <td><?= output_rating($hotel_reviews['0']['cleanliness'], "rate", true); ?></td>
            </tr>
        </table>        
        
        </td>
    </tr>
</table>



</div>

</div>
</div>
</div>



<br />

<? foreach($hotel_reviews_list as $hotel_review){ ?>
<!-- Start Review -->

<div class="box_lb_brd_590">
<div class="box_lb_brd_590_quote_cap">
<div class="box_lb_brd_590_shoe">

<div class="row_quote_head_590">
    <div class="row_quote_head_padding">
        <p class="review_sub_title"><strong><?= $hotel_review['reviewer_name'] ?></strong> gave the <strong><?= $hotel_values['name'] ?></strong> rating <?= output_rating($hotel_review['overall'], "rate", true); ?> of and said...</p>
    </div>
</div>

<div class="box_padding">

<h4><?= $hotel_review['title'] ?></h4>

<p class="no_margin"><?= trim_me($hotel_review['review'],'150') ?>... <a href="<?= $lurl_review_read ?>">more &rsaquo;</a></p>


</div>

</div>
</div>
</div>

<br />

<!-- End Review -->

<? } ?>


<ul class="list_qlinks no_margin">
    <li><a href="<?= $lurl_review_read ?>">View all <?= $hotel_reviews['0']['num_reviews'] ?> reviews</a></li>
    <li>Stayed at this hotel before?<a href="<?= $lurl_review_add ?>"> Write your own review</a></li>
</ul>


<? }else{ ?>

<p>This hotel has not yet been reviewed. Be the first to review it <a href="<?= $lurl_review_add ?>">here</a> </p>


<? } ?>


 
</div>
<!-- End hotel review tab -->

<? } ?>
